﻿using System.Windows;
using System.Windows.Media;

namespace Gmantis.Controls.Chart
{
    internal static class Extension
    {
        // Fields
        private static CornerRadius DefaultCornerRadius = new CornerRadius();
        private static Thickness DefaultThickness = new Thickness();

        // Methods
        public static bool IsDefault(this CornerRadius cr)
        {
            return (cr == DefaultCornerRadius);
        }

        public static bool IsDefault(this Thickness cr)
        {
            return (cr == DefaultThickness);
        }

        public static bool IsDefaultForeground(this object value, string key, object lvalue)
        {
            return (key.Contains("Foreground") && !(lvalue is SolidColorBrush));
        }
    }
}
